<?php
namespace App\Http\Controllers\ApiApp;

use App\DBs\UserDB;
use Illuminate\Http\Request;

class UserController extends BaseController
{
    /**
     * 用户
     */

    protected $db;

    public function __construct()
    {
        parent::__construct();
        $this->db = new UserDB();
    }

    /**
     * 发送验证码
     */
    public function sendYzm(Request $request)
    {
        $phone = $request->post('phone',0);
        $phone = '15988129456';
        $resDb = $this->db->setYzm($phone);
        if ($resDb['code']!=0) {
            return $this->toAppJson(-9,array(),$resDb['msg']);
        }
        return $this->toAppJson(0);
    }
}
